var t = getApp();

Page({
    data: {
        switch1Checked: !1,
        id: wx.getStorageSync("yz_uid")
    },
    onLoad: function(t) {},
    blackbtn: function(t) {
        wx.navigateBack({
            detail: 1
        });
    },
    switch1Change: function(a) {
        console.log(a), this.setData({
            switch1Checked: a.detail
        });
        var e = this, n = t.getNetAddresss("plugin.auction.api.index.getAuctionData"), o = {
            status: e.data.switch1Checked ? "1" : "0",
            art: "updateStatus"
        };
        t._getNetWork({
            url: n,
            data: o,
            success: function(t) {
                var a = t.data;
                1 == a.result ? "修改成功" == a.data.updateStatus ? e.setData({
                    switch1Checked: e.data.switch1Checked
                }) : wx.showToast({
                    title: a.data.updateStatus,
                    icon: "none",
                    duration: 1e3
                }) : wx.showToast({
                    title: a.msg,
                    icon: "none",
                    duration: 1e3
                });
            },
            fail: function(t) {
                console.log(t);
            }
        });
    },
    toset: function() {
        wx.navigateTo({
            url: "/packageD/auction/auctioneer-manage/set_password/set_password"
        });
    },
    onReady: function() {},
    onShow: function() {
        this.getData();
    },
    onHide: function() {},
    onUnload: function() {},
    onPullDownRefresh: function() {},
    onReachBottom: function() {},
    onShareAppMessage: function() {},
    getData: function() {
        var a = this, e = t.getNetAddresss("plugin.auction.api.index.getAuctionData"), n = {
            member_id: a.data.id
        };
        t._postNetWork({
            url: e,
            data: n,
            success: function(t) {
                var e = t.data;
                1 == e.result ? (console.log(e), a.setData({
                    status: e.data.getVerify.status,
                    is_verify: e.data.getVerify.is_verify
                }), 0 == a.data.is_verify && 1 == a.data.status ? a.setData({
                    switch1Checked: !0
                }) : a.setData({
                    switch1Checked: !1
                })) : wx.showToast({
                    title: e.msg,
                    icon: "none",
                    duration: 1e3
                });
            },
            fail: function(t) {
                console.log(t);
            }
        });
    }
});